<?php

class Core_Form_Admin_Setting_Session extends Form
{
	function init()
	{

		$this -> addChild('text', 'cookie_prefix', array(
			'label' => 'Cookie Prefix',
			'required' => true,
			'value' => 'ag-',
			'rules' => array('required'),
			'desc' => 'Prefix for cookies and PHP sessions being set by the script. <br/>Warning: This value can only contain alphanumeric characters (eg. a-zA-Z0-9)<br/>Note that everyone will be forced to login again for security reasons.'
		));

		$this -> addChild('text', 'cookie_path', array(
			'label' => 'Cookie Path',
			'required' => true,
			'value' => '/',
			'rules' => array('required'),
			'desc' => 'The path to which the cookie is saved. If you run more than one site on the same domain, it will be necessary to set this to the individual directories of your site. Otherwise, just leave it as / .<br/>Entering an invalid setting can leave you unable to login to your site..'
		));

		$this -> addChild('text', 'cookie_domain', array(
			'label' => 'Cookie Domain',
			'rules' => array('required'),
			'desc' => array('This option sets the domain on which the cookie is active. The most common reason to change this setting is that you have two different urls to your site, i.e. example.com and community.example.com. To allow users to stay logged into the site if they visit via either url, you would set this to .example.com (note the domain begins with a dot. 

You most likely want to leave this setting blank as entering an invalid setting can leave you unable to login to your site.')
		));
		$this -> addChild('text', 'session_lifetime', array(
			'label' => 'Session lifetime',
			'required' => true,
			'value' => '86400',
			'rules' => array('required'),
			'desc' => 'Define how long a user is displayed as active on the site in minutes.<br/>If a user is inactive longer then the specified setting they will be removed from the online session table. When this is done they will no longer appear to be online when other members view their profile. If the user suddenly becomes active after their session expired a new session will automatically be created.'
		));

		$this -> addChild('group', 'buttons');

		$this -> buttons -> addChild('submit', '_submit');
	}

}
